package com.dianban.controller;

import com.dianban.base.ResultCode;
import com.dianban.base.ResultVo;
import com.dianban.entity.FacePayConfig;
import com.dianban.entity.ShopUser;
import com.dianban.service.FacePayConfigService;
import com.dianban.utils.UserUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;

/**
 * @author gaozl
 * @date 2021/11/6 19:37
 */
@Api(value = "ApiFacePayConfigController", description = "配置控制器")
@RestController
@RequestMapping(value = "${interfacePath}/config/")
public class ApiFacePayConfigController {

    @Autowired
    private FacePayConfigService facePayConfigService;

    @ApiOperation(notes = "getAppVersion", httpMethod = "GET", value = "获取app版本")
    @RequestMapping(value = "getAppVersion",method = RequestMethod.GET)
    public ResultVo getAppVersion(HttpServletRequest request, HttpServletResponse response) {
        List<FacePayConfig>  facePayConfigList = facePayConfigService.find(10,1,null);
        return ResultVo.success(facePayConfigList.get(0),"操作成功");
    }
}
